package com.gmu.controller;


import com.gmu.domain.ResResult;
import com.gmu.mapper.TblRoleMapper;
import com.gmu.pojo.TblRole;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 角色 前端控制器
 * </p>
 *
 * @author testjava
 * @since 2022-07-24
 */
@Api(tags = "角色管理")
@RestController
@RequestMapping("/gmu/tbl-role")
public class TblRoleController {

    @Autowired
    private TblRoleMapper tblRoleMapper;

    @ApiOperation(value = "获取所有的角色")
    @GetMapping("/getAllRole")
    public ResResult<?> getAllRole(){
        List<TblRole> tblRoles = tblRoleMapper.getAllRole();
        return new ResResult<>(200,tblRoles);
    }

}

